Hello, at the moment I try to call the doors client in batch mode from a Java web service. If the service sends the command, the doors console windows appears and then hangs without any output forever. The doors installation (client / server) is in version : 9.6.0.0 Here the source code I'm using for this:
String doors = "\"C:\\Program Files\\IBM\\Rational\\DOORS\\9.6\\bin\\doors.exe\"";
String[] cmd = new String[9];
Process p = null;
InputStream stderr = p.getErrorStream();
I also tried to do this with the complete command as a single string and using the ProcessBuilder. The result is always the same. If I execute this command line from a windows prompt the client starts and executes the script without a problem.
Maybe someone has experience with this can give me a good hint. Thanks in advance. Regards, Andre Azielinski - Tue Aug 22 03:49:13 EDT 2017 |
Re: doors batch mode hangs if I call it from web service You need to pass the --nowait parameter ("-w") to avoid the DOORS process pausing after outputting in stdout. See also similar posts on the forum. Regards, Mathias |
Re: doors batch mode hangs if I call it from web service Mathias Mamsch - Tue Aug 22 04:34:05 EDT 2017 You need to pass the --nowait parameter ("-w") to avoid the DOORS process pausing after outputting in stdout. See also similar posts on the forum. Regards, Mathias Thanks for the quick answer. Now the client window shortly appears and then close, but I would expect to get some output from this process. At least the stuff which I print in the DXL script, or an error message if the execution failed.
Regards, Andre |
Re: doors batch mode hangs if I call it from web service Azielinski - Tue Aug 22 04:58:08 EDT 2017 Thanks for the quick answer. Now the client window shortly appears and then close, but I would expect to get some output from this process. At least the stuff which I print in the DXL script, or an error message if the execution failed.
Regards, Andre Read the other posts about output redirection with DOORS. The "print" perm does not output to stdout. Instead you would need to use cout. See here: or here: or other posts. Search for "cout batch". Regards, Mathias |
Re: doors batch mode hangs if I call it from web service Mathias Mamsch - Tue Aug 22 05:10:33 EDT 2017 Read the other posts about output redirection with DOORS. The "print" perm does not output to stdout. Instead you would need to use cout. See here: or here: or other posts. Search for "cout batch". Regards, Mathias I would not use stdout. Instead I would pass in a filename to the DXL process to write the results to and read that file after the process ends. This makes sure you only get what you write. Output inside a batch script should be considered an error. Imagine someone puts a print statement inside a library or some dxl attribute prints stuff, which will completely mess up your output. Regards, Mathias |
Re: doors batch mode hangs if I call it from web service Thanks Mathias for your help. I could manage to get the output via cout. I will continue with this way. Maybe I will come back to your suggestion with the file handling.
Regards, Andre |